import 'package:flutter/material.dart';
import '../../../widgets/common_image.dart';
import './index_navigator_item.dart';

class IndexNavigator extends StatelessWidget {
  const IndexNavigator({ Key key }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    var width = MediaQuery.of(context).size.width;
    return Container(
      width: width,
      padding: EdgeInsets.only(top: 6.0, bottom: 6.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: indexNavigatorItemList.map((item) => InkWell(
          child: Column(
            children: [
             CommonImage(item.imageUri, width: 47.5,),
              Text(item.title,
                style: TextStyle(
                  fontSize: 14.0,
                  fontWeight: FontWeight.w500
                ),
              ),
            ],
          ),
          onTap: (){
            item.onTap(context);
          },
        )).toList(),
      ),
    );
  }
}